To Create or Select Your Data Source

In order to provide a database for storing and maintaining your RFgen Mobile Applications you need to connect to a database application/server/system to your RFgen server/system.

To configure/create your datasource, from the Transaction Management Dashboard menu bar, click on Configuration > Application Database. The RFgen - Select / Create Application Database Displays.

By default, a Configuration File called ‘RFgen.rfc’, defines the profile of the solution database, as shown below. 

If you need to change the rfc file or select a different rfc file, you can use the list, search or plus (+) icons to browse to the %APPDATA%\ProgramData\RFgen52 folder.

This Configuration File was created when the Mobile Unity Platform software (RFgen Server) was installed. It identifies a Microsoft Access file called 'RFgen.mdb' located in the C:\ Users \ <username> \ AppData \ Roaming \ RFgen52 directory as the database that contains the programming items (Applications, Menus, Users and VBA code) written with the Mobile Development Studio, including the pre-scripted items. This is only the default place where the sample applications are deployed. It is not necessary to use this location.

The System / Company Id field is used to describe the owner of the configuration file. Since there may be many configuration files referencing different databases for different customers or copies of the same customer’s database, this field acts as the description.

The System Database drop down field selects which type of database is to be used to host the solution objects. Changing this value changes the window to show database specific configuration fields. The server supports Access, SQLite, SQL Server and Oracle as database containers. The solution stores the information to connect to these databases in an “rcf” file. You can also select these rfc files when exporting / importing to that database container.

Data Access Mode sets the cursor to either Static or Dynamic when retrieving data from the database. Usually, Static is best because it is fast and safe. However, if you have a database like Pervasive that will actually make a copy of the data from the database system to the RFgen system when using a static cursor, you can change this option to Dynamic, so performance will not suffer. Internally, this sets the cursor option to either adoOpenStatic or adoOpenDynamic.

The Session Timeout value (in hours) will disconnect and reconnect to the database at the specified interval. This may be required if the database is configured to not allow a connection that never times out.

The Query Timeout (in seconds) specifies how long the server should wait before giving up on the ODBC driver to come back with a response.

Reset on Error is a list of hex values that if returned by the ODBC driver will cause a reset of the connection. The process for adding a value is to first get the error number from the error log.

Example: the error log shows -21456327. Use the Windows calculator in Programmer mode, select Dec and Dword options, enter the number and if you need the negative sign use the ± button to change its sign. Then click the Hex option. You should get: FEB89A39. Enter this value into the box with a “0x” prefix like:  0xFEB89A39

Connection

If connecting to Access Database...

If connecting to Oracle Database...

If connecting to SQL...

If connecting to SQLite...

 

Finally click on the Test Connection button to verify connectivity. If the database has not already been setup to support the solution tables they will be created at this time. Clicking the Save Changes button will also create what is necessary but won’t test the connection. Either button will also notice if the database came from an older release and ask if you want it upgraded.